#include<stdio.h>
#include<stdlib.h>
#include<sys/wait.h>
#include<unistd.h> 
#include<assert.h>
int main(){
	pid_t id = fork();
	if(!id){
		printf("my child process id:%d\n",getpid());
		sleep(10);
		exit(0);
	}
	assert(id != -1); 
	printf("wait child...\n");
	sleep(15);
	id = wait(NULL);
	printf("wait success! child id:%d\n", id);
	return 0;
}
